package com.xiaoma.chat.dto;

import org.apache.commons.lang.StringUtils;

public class HistoryMessageDto {

    private String fromUserId;
    private String targetId;
    private Integer targetType;
    private String groupId;
    private String date;
    public String getFromUserId() {
        return fromUserId;
    }
    public void setFromUserId(String fromUserId) {
        this.fromUserId = fromUserId;
    }
    public String getTargetId() {
        return targetId;
    }
    public void setTargetId(String targetId) {
        this.targetId = targetId;
    }
    public Integer getTargetType() {
        return targetType;
    }
    public void setTargetType(Integer targetType) {
        this.targetType = targetType;
    }
    public String getGroupId() {
        return groupId;
    }
    public void setGroupId(String groupId) {
        this.groupId = groupId;
    }
    public String getDate() {
        return date.substring(0, 10);
    }
    public void setDate(String date) {
        this.date = date;
    }
    public boolean validate() {
        return StringUtils.isNotEmpty(this.date);
    }
}
